<template>
  <div>
    <div>
      首页
    </div>
    <van-button type="primary" @click="login">登录</van-button>
  </div>
</template>

<script>
import { useStore } from 'vuex';
import { ref, getCurrentInstance } from 'vue';

export default {
  name: 'MultiplePageArchitectureIndex',
  setup() {
    const instance = getCurrentInstance();
    const { proxy } = instance;
    /**
     * 调用原生API
     */
    const login = () => {
      proxy.$bridge.link.login();
    };

    const name = ref('');
    name.value = useStore().state.name;
    return {
      name,
      login,
    };
  },
  data() {
    return {};
  },

  mounted() {},

  methods: {
    test() {},
  },
};
</script>

<style lang="scss" scoped></style>
